import {
    getSongListAPI
} from "../../api/songer";
import {
    GETSONGLIST
} from "../constants";


export const getSongListAction = (id) => {
    return async (dispatch) => {
        let res = await getSongListAPI(id);
        const data = res.data;
        dispatch({
            type: GETSONGLIST,
            data: {
                id,
                data,
            }
        });
        return data;
    }
}